package com.mht2017.common.dto;

import java.io.Serializable;

public class RestAPIResult<T> implements Serializable {

	private static final long serialVersionUID = 1L;

	private String resultCode;
	private long timestamp;
	private String msg;
	private T data;

	public RestAPIResult() {
	}

	public RestAPIResult(String resultCode, String msg) {
		this.resultCode = resultCode;
		this.msg = msg;
	}

	public RestAPIResult(String resultCode, long timestamp) {
		this.resultCode = resultCode;
		this.timestamp = timestamp;
	}

	public RestAPIResult(String resultCode, T data) {
		this.resultCode = resultCode;
		this.data = data;
	}

	public RestAPIResult(String resultCode, long timestamp, String msg) {
		this.resultCode = resultCode;
		this.timestamp = timestamp;
		this.msg = msg;
	}

	public RestAPIResult(String resultCode, String msg, T data) {
		this.resultCode = resultCode;
		this.msg = msg;
		this.data = data;
	}

	public String getResultCode() {
		return resultCode;
	}

	public void setResultCode(String result) {
		this.resultCode = result;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	@Override
	public String toString() {
		return "RestAPIResult [resultCode=" + resultCode + ", timestamp=" + timestamp + ", msg=" + msg + ", data=" + data + "]";
	}

}
